package user;

import java.io.IOException;

public class SystemMenu {
    static public void showMenu(){
        System.out.println("**\tMVC架构收银管理系统\t**");
        System.out.println("-------------------------");
        System.out.println("|\t1.浏览商品\t\t\t|");
        System.out.println("|\t2.下单\t\t\t\t|");
        System.out.println("|\t3.支付\t\t\t\t|");
        System.out.println("|\t4.退款\t\t\t\t|");
        System.out.println("|\t5.管理员系统\t\t\t|");
        System.out.println("|\t6.退出\t\t\t\t|");
        System.out.println("-------------------------");
        System.out.print("请选择：");
    }
    public static void clearScreen() {
        try {
            String os = System.getProperty("os.name");
            if (os.contains("Windows")) {
                new ProcessBuilder("cmd", "/c",
                        "cls").inheritIO().start().waitFor();
            } else {
                Runtime.getRuntime().exec("clear");
            }
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

